package jungsun;

import java.util.Scanner;

public class J05Ex31CreditCard {
	// 신용카드종류,은행정보출력
	public static void main(String[]args){
		//변수선언
		int mycard = 0;
		String result = "";
		Scanner sc= null;
		int cardno1=0,cardno2=0;
		
		//숫자입력 및 정보조회
		System.out.println("신용카드 번호를 입력하세요");
		 sc = new Scanner(System.in);
		mycard =sc.nextInt();
		
		cardno1= mycard /10000; //둘째자리
		cardno2= mycard /100000;//첫째자리
		
		if (cardno1==35){
		switch(mycard){
		case 356317:result ="JCB 농협카드";break;
		case 356901:result ="신한카드입니다";break;
		case 356912:result ="비씨카드입니다";break;
		default:result="잘못된 카드번호!";
		
		}
	}else if(cardno2==4){
	
	}else if(cardno2==5){
	}
		//결과출력, 신용카드번호각각축출
		System.out.println(mycard);
		System.out.println(mycard/10);
		System.out.println(mycard/100);
		System.out.println(mycard/1000);
		System.out.println(mycard/10000);
		System.out.println(mycard/100000);
		System.out.println(result);
		sc.close();
		}
	
	
}

